from datetime import datetime

from tools import db


class BaseModel:
    """Model base class, adding creation time and update time for each model"""

    create_time = db.Column(db.DateTime, default=datetime.now)
    update_time = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
